import request from '@/utils/request'



export function inventoryList(data) { //库存管理-列表
  return request({
    url: '/maintenance-management/api/sapStock/page',
    method: 'post',
    data
  })
}


export function inventoryAdd(data) { //库存管理-新增
  return request({
    url: '/maintenance-management/api/sapStock/add',
    method: 'post',
    data
  })
}

export function inventoryEdit(data) { //库存管理-编辑
  return request({
    url: '/maintenance-management/api/sapStock/edit',
    method: 'post',
    data
  })
}

export function inventoryDelete(id) { //库存管理-删除
  return request({
    url: '/maintenance-management/api/sapStock/del/' + id,
    method: 'get',
  })
}


export function inventoryDetail(id) { //库存管理-详情
  return request({
    url: '/maintenance-management/api/sapStock/' + id,
    method: 'get',
  })
}



export function inventoryFpso(data) { //库存管理-fpso
  return request({
    url: '/project-quality/api/facility/get/list',
    method: 'POST',
    data,
  })
}
export function inventoryUpload(data) { //库存管理-手动导入
  return request({
    url: '/maintenance-management/api/sapStock/import',
    method: 'POST',
    data,
  })
}
export function inventoryExport(data) { //库存管理-导出
  return request({
    url: '/maintenance-management/api/sapStock/export',
    responseType: 'arraybuffer',
    method: 'POST',
    data,
  })
}
